|
In mathematics, big O notation describes the limiting behavior of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions. It is a member of a larger family of notations that is called Landau notation, Bachmann–Landau notation (after Edmund Landau and Paul Bachmann), or asymptotic notation. In computer science, big O notation is used to classify algorithms by how they respond (''e.g.,'' in their processing time or working space requirements) to changes in input size. In analytic number theory, it is used to estimate the "error committed" while replacing the asymptotic size, or asymptotic mean size, of an arithmetical function, by the value, or mean value, it takes at a large finite argument. A famous example is the problem of estimating the remainder term in the prime number theorem. Big O notation characterizes functions according to their growth rates: different functions with the same growth rate may be represented using the same O notation. The letter O is used because the growth rate of a function is also referred to as order of the function. A description of a function in terms of big O notation usually only provides an upper bound on the growth rate of the function. Associated with big O notation are several related notations, using the symbols ''o'', Ω, ω, and Θ, to describe other kinds of bounds on asymptotic growth rates. Big O notation is also used in many other fields to provide similar estimates. ==Formal definition== Let ''f'' and ''g'' be two functions defined on some subset of the real numbers. One writes : if and only if there is a positive constant M such that for all sufficiently large values of ''x'', the absolute value of ''f''(''x'') is at most M multiplied by the absolute value of ''g''(''x''). That is, ''f''(''x'') = ''O''(''g''(''x'')) if and only if there exists a positive real number ''M'' and a real number ''x''0 such that : In many contexts, the assumption that we are interested in the growth rate as the variable ''x'' goes to infinity is left unstated, and one writes more simply that ''f''(''x'') = ''O''(''g''(''x'')). The notation can also be used to describe the behavior of ''f'' near some real number ''a'' (often, ''a'' = 0): we say : if and only if there exist positive numbers ''δ'' and ''M'' such that : If ''g''(''x'') is non-zero for values of ''x'' sufficiently close to ''a'', both of these definitions can be unified using the limit superior: : if and only if : Additionally, the notation ''O''(''g''(''x'')) is also used to denote the set of all functions ''f''(''x'') that satisfy the relation ''f''(''x'')=''O''(''g''(''x'')). In this case we write : 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Big O notation」の詳細全文を読む スポンサード リンク
|